﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Auth/Auth.Master" AutoEventWireup="true"
    CodeBehind="HomePage.aspx.cs" Inherits="CoastalClimbing.Auth.HomePage" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function txtTitleKeyUp() {
            __doPostBack('<%= txtTitle.ClientID %>', 'txtTitleKeyPress');
        }
        function txtMessageKeyUp() {
            __doPostBack('<%= txtMessage.ClientID %>', 'txtMessageKeyPress');
        }        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="scriptmanager" runat="server" />
    <asp:Label ID="lblMessage" runat="server" Visible="false" ForeColor="Red" />
    <asp:UpdatePanel ID="upnl" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="txtTitle" />
            <asp:AsyncPostBackTrigger ControlID="txtMessage" />
            <asp:AsyncPostBackTrigger ControlID="ddlTitleStyle" />
            <asp:AsyncPostBackTrigger ControlID="ddlMessageStyle" />
        </Triggers>
        <ContentTemplate>
            <div id="latestBlurb">                
                <asp:Literal ID="litTitle" runat="server" />
                <div id="membershipInfo">
                    <asp:Literal ID="litMessage" runat="server" />                    
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <asp:TextBox ID="txtTitle" runat="server" MaxLength="50" 
        onkeyup="txtTitleKeyUp();" AutoPostBack="true" 
        ontextchanged="txtTitle_TextChanged" Columns="50" />
    <br />
    <asp:TextBox ID="txtMessage" runat="server" MaxLength="600" TextMode="MultiLine" onkeyup="txtMessageKeyUp();" OnTextChanged="txtMessage_TextChanged"
        AutoPostBack="true" Rows="10" Columns="60" />
    <br />
    Title Color: 
    <asp:DropDownList ID="ddlTitleStyle" runat="server" AutoPostBack="true" 
        onselectedindexchanged="ddlTitleStyle_SelectedIndexChanged" />
        <br />
        Message Color: 
    <asp:DropDownList ID="ddlMessageStyle" runat="server" AutoPostBack="true" 
        onselectedindexchanged="ddlMessageStyle_SelectedIndexChanged" />
        <br />
    <asp:Button ID="btnSave" runat="server" Text="Publish" OnClick="btnSave_Click" />
</asp:Content>

